using System;
using ChessKit.Common.Primitives;

namespace ChessKit.ChessLogics.Internals
{
  internal static class Color
  {
    public static PieceColor Parse(char symbol)
    {
      switch (symbol)
      {
        case 'W':
        case 'w':
          return PieceColor.White;
        case 'B':
        case 'b':
          return PieceColor.Black;
        default:
          throw new FormatException("What color is that?");
      }
    }
  }
}